<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,2,3,4,5]
        var [a,b,c] = arr
        console.log(a,b,c)

        var obj = {
            name : 'hl',
            age : 18
        }
        var {name,age} = obj
        console.log(name,age)

        //如果对象里面，属性名和属性值是相同，可以不用写属性值
        var name = 'hl'
        var age = 18
        var obj1 = {
            name,
            age
        }
    </script>
</body>
</html>